The invention relates to an optical device for reading and decoding bars of different reflectivity arranged in accordance with a barcode and adjoining one another, comprising an optical scanning device for scanning the bars by means of a light beam, a sensor for receiving the reflected light beam and converting the latter into an electrical sensor output signal, a transition detector for detecting the level transitions of the electrical sensor output signal and a decoding device which decodes the scanned barcode on the basis of the output signals from the transition detector.
A device of this type, which is also termed a laser scanner, is generally known.
With such a laser scanner a laser beam (for example originating from a semi-conductor laser with a wavelength of 670 nm) is directed onto a scan pattern generator. The scan pattern generator controls the laser beam in such a way that a pattern of sequential scan lines is written over a surface to which a barcode has been applied.
A small proportion of the light scattered by the barcode reaches a sensor, for example in the form of a photodiode, via a scan system, which operates in the reverse manner to the scan pattern generator, and via a collector lens. A laser spot moving linearly over the barcode is produced and after reflection from the barcode and after incidence on the sensor an electrical signal is generated at the output of the sensor, which signal varies as a function of time in accordance with the barcode. Two digital signals are derived from said electrical sensor output signal, the one digital signal indicating the points in time at which a transition from light to dark takes place, whilst the other signal indicates the points in time of the transitions from dark to light. Decoding of the barcode is then carried out in a digital processor. The result is fed in the form of a row of characters to the microncontroller. A microcontroller also performs a number of checks (for example check numeral) and determines whether the result is good or not. In the former case the good result is sent to the main computer (for example the till), accompanied by a "bleep" and a LED light signal. A microcontroller manages the entire process and also has a number of supplementary tasks.
The path from the sensor to the decoding unit plays a crucial role in the quality of the scanner. The signal received is usually very small and is then close to the noise. This occurs especially in the case of a large read distance and with barcodes which have a poor contrast. Close up and with good contrast, on the other hand, the signal can be very strong.
For safety reasons the strength of the laser light may not be high. Furthermore, the time between two transitions varies with the scanning distance and the barcode density. Taking account of the minimum and maximum distance and the maximum and minimum barcode density, a frequency range can be defined within which it must be possible to detect. An appreciable improvement is already achieved by filtering out this range.
The aim of the invention is to provide an optical device of the type mentioned in the preamble with which the reliability is even further improved, including in the case of a low signal-to-noise ratio when scanning, in a simple manner and with few components. Furthermore, the aim is as far as possible to prevent possible codes which result from noise, the so-called "ghost reads".
The U.S. Pat. Nos. 5,298,728; 5,581,072 and 4,740,675 disclose an analog processor for a laser scanner. In said patents mainly the methods are discussed for offering data as well as possible to the decoder of the scanner. This is not the subject matter of this patent application. In this patent application it is suggested and solutions are given to keep the number of rescanning as low as possible while improvement of misread performance is maintained.
The European patent application 0 661 661 describes a CCD scanner with a fixed barcode position. More than one scan is always carried out. The decoder of the scanner does not produce a position of a good result per se, but only indicates that if there are more equal results these results will be the correct one. In other words the majority decides. This is a very poor solution and only one scan will never be sufficient. In said European patent application the distinction between good and poor barcodes is not emphasized.
A barcode is omnidirectionally positioned, i.e. position and orientation vary. This means also that scan data originate from scan lines having mutually different angles, so that the scan data as offered to the decoder are not comparable on that level, c.f. for example European patent application 0 661 661.
Light reflected from the barcode is received by the sensor and converted in an electrical signal. In the subsequent analog processor a first pulse train is derived from that electrical signal, which pulse train indicates the moment of occurrence of a transition of black to white. Also a second pulse train is produced, which indicates the moments on which a transition of white to black takes place. In several prior art scanners a signal (jam signal) is delivered, which indicates that a white area a long duration has been found (advance area to the barcode).
The above-mentioned digital outputs of the analog processor are fed to the decoder, consisting of a ASIC and a microprocessor. Said decoder decides whether the barcode is good or not. If the decoder decides that the barcode is good, the produced date is transmitted to the HOST and a positive signal is delivered.
In several prior art apparatus a parameter is used, which could be set externally (called COUNT). The decoder must decide to a good result if at least a number of results has been found, which number is equal to the number indicated by COUNT.
It could happen that a sufficient number of scans enter during the intake of scan information, so that an eventually COUNT&gt;1 is met. But is the barcode is kept marginally in the scan area it could happen that only data of one complete scan has been received. If COUNT=2 has been set a rescan must be carried out. That stagnates. Consequently, the COUNT=1 is preferred. This could be sufficient in many circumstances if the decoder operates sufficiently critical. However, when the barcode print is poor, a difficult barcode colour is used or the distance to the barcode is large, the information applied to the decoder could be such that the decoder decides that a good barcode is received, whereas this decision is not correct. Then it is spoken of as a misread which is a severe condition.
In view of above circumstances a further aim of the invention is to have only a higher COUNT in troublesome conditions.